#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
int is_exists(char ch, char arr[]) {
	int j = 0;
	while (arr[j]) {
		if (ch == arr[j])
			return 1;
		    j++;
	}
	return 0;
}
int main() {
	char arr1[100] = { 0 };
	char arr2[100] = { 0 };
	gets(arr1);
	gets(arr2);
	int i = 0;
	while (arr1[i] != '\0') {
		if (is_exists(arr1[i], arr2) == 0)
			printf("%c", arr1[i]);
		i++;
	}
	return 0;
}